const state = {
  plcId: null,
  plcIdSelIndex: null,
  plcIdChangeSelIndex: null,
  plcVideoSrc: '',
  ScreenWidth:null,
  PlcList: [],
  plcData:{
    od:null,
    oxd:null,
    td:null,
    dataTime:null
  }
};
const mutations = {
  SET_PLC_ID(state, plcId) {
    state.plcId = plcId;
  },
  SET_PLC_ID_CHANGE_Sel_Index(state, plcIdChangeSelIndex) {
    state.plcIdChangeSelIndex = plcIdChangeSelIndex;
  },
  SET_PLC_ID_Sel_Index(state, plcIdSelIndex) {
    state.plcIdSelIndex = plcIdSelIndex;
  },
  SET_VIDEO_SRC(state, PlcVideoSrc) {
    state.plcVideoSrc = PlcVideoSrc;
  },
  SET_PLC_REAL_TIME_DATA(state, plcData){
    state.plcData = plcData;
  },
  SET_PLC_LIST(state, PlcList){
    state.PlcList = PlcList;
  },
  SET_SCREEN_WIDTH(state, ScreenWidth) {
    state.ScreenWidth = ScreenWidth;
  }
};
const actions = {
  setPlcId({commit}, plcId) {
    commit('SET_PLC_ID', plcId)
  },
  setPlcIdSelIndex({commit}, plcIdSelIndex) {
    commit('SET_PLC_ID_Sel_Index', plcIdSelIndex)
  },
  setPlcIdChangeSelIndex({commit}, plcIdChangeSelIndex) {
    commit('SET_PLC_ID_CHANGE_Sel_Index', plcIdChangeSelIndex)
  },
  setVideoSrc({commit}, PlcVideoSrc) {
    commit('SET_VIDEO_SRC', PlcVideoSrc)
  },
  setPlcRealTimeData({commit}, plcData) {
    commit('SET_PLC_REAL_TIME_DATA', plcData)
  },
  setPlcList({commit}, PlcList) {
    commit('SET_PLC_LIST', PlcList)
  },
  setScreenWidth({commit}, ScreenWidth) {
    commit('SET_SCREEN_WIDTH', ScreenWidth)
  },
};
export default {
  namespaced: true,
  state,
  actions,
  mutations
}
